package main

import (
	"fmt"
	"math/rand"
	"strconv"
	"strings"
)

func sli() {
	a := make([]int, 0, 10)
	for i := 0; i < 100; i++ {
		a = append(a, rand.Intn(128))
	}

	m := make(map[int]int, 100)
	for i, ele := range a {
		m[ele] = i
	}
	fmt.Println(len(m))
}

func arr2string(arr []int) string {
	s := strings.Builder{}

	if len(arr) == 1 {
		s.WriteString("\"")
		s.WriteString(strconv.Itoa(arr[0]))
		s.WriteString("\"")
	} else {
		s.WriteString("\"")
		for i, ele := range arr {
			if i == len(arr)-1 {
				s.WriteString(strconv.Itoa(ele))
				break
			}
			s.WriteString(strconv.Itoa(ele))
			s.WriteString(" ")
		}
		s.WriteString("\"")
	}
	return s.String()
}

func main() {
	sli()

	a := arr2string([]int{1})
	fmt.Println(a)

	b := arr2string([]int{1, 2})
	fmt.Println(b)

	c := arr2string([]int{1, 2, 3, 444, 555, 666143, 12312312})
	fmt.Println(c)

}
